﻿using System.Collections.Generic;

namespace CapstoneProjectAEReader.Common.Utility
{
    public static class Constants
    {
        /* Declaration example
         * public const string test = "";
         */
        public const string ApplicationResource = "CapstoneProjectAEReader.Common.Resources.ApplicationLanguage";
        public const string ApplicationTitle = "AeReader";
        public const string AllowedChars = "abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNOPQRSTUVWXYZ";
        public const string FullDateTimeFormatToSecond = "yyyy/MM/dd HH:mm:ss";
        public const string XmlExtension = ".xml";
        public const string DatFileName = "AeAppData.dat";
        public const string Na = "N/A";
        public const string TranslationResult = "({0}){1} : ({2}){3} ";
        public const string GroupTemplate = "{0}({1})";
        public const string UnGroup = "UnGroup";
        public const string PathToRoot = "/AEReader/Controls";

        /// <summary>
        /// PDF file metadata
        /// </summary>
        public static class PdfInfo
        {
            public const string Title = "Title";
            public const string Author = "Author";
        }

        public static class ExceptionCode
        {
            public const int Program = 1;
            public const int Function = 2;
        }

        public static class FileFilter
        {
            public const string PdfEpub = "pdf files (*.pdf) |*.pdf| epub files (*.epub)|*.epub| All Files|*.*";
            public const string FileExporter = "doc|*.doc | docx|*.docx | All Files |*.*";
        }

        public static class EbookType
        {
            public const string Pdf = ".pdf";
            public const string Epub = ".epub";
            public const string PdfIcon = "PDF.png";
            public const string EpubIcon = "ePUB.png";
            public const string FileIcon = "File.png";
        }

        /// <summary>
        /// Contains ordering type for application
        /// </summary>
        public static class OrderMode
        {
            public const int AlphabeticalOrder = 0;
            public const int TimeOrder = 1;
        }

        /// <summary>
        /// Contains searching type for application
        /// </summary>
        public static class SearchMode
        {
            public const int ByTitle = 0;
            public const int ByAuthor = 1;
            public const int ByDate = 2;
        }

        public static class ExportSupporter
        {
            public const string Author = "Author: ";
            public const string Title = "Title: ";
            public const string Rating = "Rating: {0}/5";
            public const string ImportDate = "Imported Date: ";
            public const string Description = "Description: ";
            public const string NoteHeader = "Note";
            public const string DescriptionHeader = "Description";
            public const string PageNoHeader = "Page Number";
        }

        /// <summary>
        /// Support Setting class
        /// </summary>
        public static class SettingSupporter
        {
            public static string Vietnamese = "vi-VN";
            public static string English = "en-US";
            public static readonly Dictionary<string, string> SupportedLanguages =
                new Dictionary<string, string>()
                    {
                        {"Tiếng Việt","vi-VN"},
                        {"English","en-US"}
                    };
            public static readonly List<string> SupportedFontTypes = new List<string> {""};
            public static int DayReadingMode = 0;
            public static int NightReadingMode = 1;
        }

        /// <summary>
        /// Contains languages support translate
        /// </summary>
        public static class LanguagesForTranslating
        {
            public static readonly Dictionary<string, string> Languages = new Dictionary<string, string> {};
        }

        /// <summary>
        /// Directory structure
        /// </summary>
        public static class StorageStructure
        {
            public const string Ebook = "Books";
            public const string RootFolder = "AeReaderData";
            public const string ControlFolder = "Controllers";
            public const string EbookFolder = RootFolder + CommonCharacters.SlashString + "Books";
            public const string TempFolder = RootFolder + CommonCharacters.SlashString + "Temp";
            public const string ApplicationData = RootFolder + CommonCharacters.SlashString + "AeAppData.dat";
            public const string MappingXmlFile = ControlFolder + CommonCharacters.SlashString + "Mapping.xml";
            public const string IconRoot = "Images";
            public const string FileTypeIcon = IconRoot + CommonCharacters.SlashString + "FileTypes";
        }

        /// <summary>
        /// Contain common characters
        /// </summary>
        public static class CommonCharacters
        {
            public const string SlashString = "\\";
            public const string Empty = "";
            public const string Comma = ",";
            public const string NextLine = "\r\n";
            public const string Sharp = "#";
            public const char NgoacDon = '(';
            public const string HaiCham = ":";
            public const char Dot = '.';
        }
    }
}